Firewalls and routers are critical network components that must be tested to ensure they are configured securely and working as intended.

Firewalls and routers are critical elements in software-defined networks and are often components of virtualized environments. Also, they are critical infrastructure components in the physical host systems on which the virtualized environments are running.

Firewalls are designed to be points of data restriction (choke points) between security domains. They operate on a set of rules driven by a security policy to determine what types of data are allowed from one side to the other (point A to point B) and back again (point B to point A).

Similarly, routers can also serve some of these functions when configured with access control lists (ACLs). Organizations deploy these devices to not only connect network segments but to restrict access to only those data flows that are required. This can help protect organizational data assets. Routers with ACLs, if used, are usually placed in front of the firewalls to reduce the noise and volume of traffic hitting the firewall. This allows the firewall to be more thorough in its analysis and handling of traffic. This strategy is also known as layering or defense-in-depth.

Changes to devices should be governed by change control processes that specify what types of changes can occur and when they can occur. This prevents haphazard and dangerous changes to devices that are designed to protect internal systems from other potentially hostile networks, such as the internet or an extranet to which the organization’s internal network connects. Change control processes should include security testing to ensure that changes were implemented correctly and as expected.

Configuration of these devices should be reflected in security procedures, and the rules of the ACLs should be engendered by organizational policy. The point of testing is to ensure that machine configurations match approved policy.

A sample baseline follows for the internet perimeter systems (edge routers and firewalls). Edge routers will have the following qualities:

Firewalls will have the following qualities:

With a sample baseline in mind, port scanners and vulnerability scanners can, in some cases, be leveraged to test the choke point’s ability to filter as specified.

If internal (trusted) systems are reachable from the external (untrusted) side in ways not specified by policy, a mismatch has occurred and should be assessed. Likewise, internal to external testing should conclude that only the allowed outbound traffic could occur. The test should compare device logs with the tests dispatched from the test host.

Advanced firewall testing will test a device’s ability to perform the following (this is a partial list and is a function of the firewall’s capabilities):

Advanced firewall testing can leverage a vulnerability or port scanner’s ability to dispatch denial-of-service and reconnaissance tests. A scanner can be configured to direct, for example, massive amounts of SYN packets at an internal host. If the firewall is operating properly and effectively, it will limit the number of these half-open attempts by intercepting them so that the internal host is not adversely affected. These tests must be used with care since there is always a chance that the firewall will not do what is expected and the internal hosts might be affected.